Package com.cisco.pt.ipc.sim.impl
Class SwitchPortImpl
java.lang.Object
com.cisco.pt.ipc.impl.IPCObjectImpl
com.cisco.pt.ipc.sim.impl.ProcessImpl
com.cisco.pt.ipc.sim.impl.PortImpl
com.cisco.pt.ipc.sim.impl.SwitchPortImpl
- All Implemented Interfaces:
IPCObject,Port,Process,SwitchPort
Information provided by the PKI file:
\class SwitchPort
\brief SwitchPort handles and manipulates switch ports.
\example network().getDevice("Switch0").getPort("FastEthernet0/1")
- Author:
- Auto-generated
-
Field Summary
Fields inherited from class com.cisco.pt.ipc.impl.IPCObjectImpl
accessMessage, ipcFactory, packetTracerSession -
Constructor Summary
ConstructorsConstructorDescriptionSwitchPortImpl(IPCFactory ipcFactory, PacketTracerSession packetTracerSession, IPCMessageLTV accessMessage) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddTrunkVlans(int start, int end) Information provided by the PKI file:intInformation provided by the PKI file:intInformation provided by the PKI file:intInformation provided by the PKI file:Information provided by the PKI file:intInformation provided by the PKI file:booleanInformation provided by the PKI file:booleanInformation provided by the PKI file:booleanInformation provided by the PKI file:booleanInformation provided by the PKI file:voidremoveTrunkVlans(int start, int end) Information provided by the PKI file:voidsetAccessPort(boolean bAccessPort) Information provided by the PKI file:voidsetAccessVlan(int vlan) Information provided by the PKI file:voidsetAdminOpMode(SwitchPortMode type) Information provided by the PKI file:voidsetCdpEnable(boolean bCDPEnable) Information provided by the PKI file:voidsetNativeVlanId(int vlanID) Information provided by the PKI file:voidsetNonegotiateFlag(boolean bFlag) Information provided by the PKI file:voidsetVoipVlanId(int vlanID) Information provided by the PKI file:Methods inherited from class com.cisco.pt.ipc.sim.impl.PortImpl
deleteLink, getBandwidth, getBia, getChannel, getClockRate, getDescription, getEncapProcess, getHardwareQueue, getHigherProcessCount, getKeepAliveProcess, getLightStatus, getLink, getMacAddress, getName, getPortNameNumber, getPower, getQosQueue, getTerminalTypeShortString, getType, isAutoCross, isBandwidthAutoNegotiate, isDuplexAutoNegotiate, isEthernetPort, isFullDuplex, isPortUp, isPowerOn, isProtocolUp, isStraightPins, isWirelessPort, setBandwidth, setBandwidthAutoNegotiate, setChannel, setClockRate, setDescription, setDuplexAutoNegotiate, setFullDuplex, setMacAddress, setPowerMethods inherited from class com.cisco.pt.ipc.sim.impl.ProcessImpl
getOwnerDeviceMethods inherited from class com.cisco.pt.ipc.impl.IPCObjectImpl
getAccessMessage, getClassName, getFactory, getObjectUUID, getPacketTracerSession, sendMessage, sendMessageWithReturn, translateToCommandStatusStringPairMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.cisco.pt.ipc.IPCObject
getAccessMessage, getClassName, getFactory, getObjectUUID, getPacketTracerSessionMethods inherited from interface com.cisco.pt.ipc.sim.Port
deleteLink, getBandwidth, getBia, getChannel, getClockRate, getDescription, getEncapProcess, getHardwareQueue, getHigherProcessCount, getKeepAliveProcess, getLightStatus, getLink, getMacAddress, getName, getPortNameNumber, getPower, getQosQueue, getTerminalTypeShortString, getType, isAutoCross, isBandwidthAutoNegotiate, isDuplexAutoNegotiate, isEthernetPort, isFullDuplex, isPortUp, isPowerOn, isProtocolUp, isStraightPins, isWirelessPort, setBandwidth, setBandwidthAutoNegotiate, setChannel, setClockRate, setDescription, setDuplexAutoNegotiate, setFullDuplex, setMacAddress, setPowerMethods inherited from interface com.cisco.pt.ipc.sim.Process
getOwnerDevice
-
Constructor Details
-
SwitchPortImpl
public SwitchPortImpl(IPCFactory ipcFactory, PacketTracerSession packetTracerSession, IPCMessageLTV accessMessage)
-
-
Method Details
-
setAccessPort
public void setAccessPort(boolean bAccessPort) Information provided by the PKI file:
\brief Enables or disables switch mode access. \param bAccessPort, true to enable switch mode access, false to disable it.- Specified by:
setAccessPortin interfaceSwitchPort- Parameters:
bAccessPort- Takes in a parameter of bAccessPort
-
isAccessPort
public boolean isAccessPort()Information provided by the PKI file:
\brief Returns true if switch mode access is enabled, otherwise false. \return bool, true if switch mode access is enabled, otherwise false.- Specified by:
isAccessPortin interfaceSwitchPort- Returns:
- boolean Returns a boolean
-
setAccessVlan
public void setAccessVlan(int vlan) Information provided by the PKI file:
\brief Sets the access VLAN. \param int, the VLAN number.- Specified by:
setAccessVlanin interfaceSwitchPort- Parameters:
vlan- Takes in a parameter of vlan
-
getAccessVlan
public int getAccessVlan()Information provided by the PKI file:
\brief Returns the access VLAN. \return int, the VLAN number.- Specified by:
getAccessVlanin interfaceSwitchPort- Returns:
- int Returns a int
-
addTrunkVlans
public void addTrunkVlans(int start, int end) Information provided by the PKI file:
\brief Adds trunk VLANs. \param start, the first trunk VLAN number. \param end, the last trunk VLAN number.- Specified by:
addTrunkVlansin interfaceSwitchPort- Parameters:
start- Takes in a parameter of startend- Takes in a parameter of end
-
removeTrunkVlans
public void removeTrunkVlans(int start, int end) Information provided by the PKI file:
\brief Removes the specified trunk VLANs. \param start, the first trunk VLAN number. \param end, the last trunk VLAN number.- Specified by:
removeTrunkVlansin interfaceSwitchPort- Parameters:
start- Takes in a parameter of startend- Takes in a parameter of end
-
setCdpEnable
public void setCdpEnable(boolean bCDPEnable) Information provided by the PKI file:
\brief Enables or disables CDP. \param bCDPEnable, true to enable CDP, false to disable it.- Specified by:
setCdpEnablein interfaceSwitchPort- Parameters:
bCDPEnable- Takes in a parameter of bCDPEnable
-
isCdpEnable
public boolean isCdpEnable()Information provided by the PKI file:
\brief Returns true if CDP is enabled, otherwise false. \return bool, true if CDP is enabled, otherwise false.- Specified by:
isCdpEnablein interfaceSwitchPort- Returns:
- boolean Returns a boolean
-
setNativeVlanId
public void setNativeVlanId(int vlanID) Information provided by the PKI file:
\brief Sets the native VLAN ID. \param vlanID, the native VLAN number.- Specified by:
setNativeVlanIdin interfaceSwitchPort- Parameters:
vlanID- Takes in a parameter of vlanID
-
getNativeVlanId
public int getNativeVlanId()Information provided by the PKI file:
\brief Returns the native VLAN ID. \return int, the native VLAN number.- Specified by:
getNativeVlanIdin interfaceSwitchPort- Returns:
- int Returns a int
-
setVoipVlanId
public void setVoipVlanId(int vlanID) Information provided by the PKI file:
\brief Sets the VOIP VLAN ID. \param vlanID, the VOIP VLAN number.- Specified by:
setVoipVlanIdin interfaceSwitchPort- Parameters:
vlanID- Takes in a parameter of vlanID
-
getVoipVlanId
public int getVoipVlanId()Information provided by the PKI file:
\brief Returns the VOIP VLAN ID. \return int, the VOIP VLAN number.- Specified by:
getVoipVlanIdin interfaceSwitchPort- Returns:
- int Returns a int
-
setNonegotiateFlag
public void setNonegotiateFlag(boolean bFlag) Information provided by the PKI file:
\brief Enables or disables nonnegotiate. \param bFlag, true to enable nonnegotiate, false to disable it.- Specified by:
setNonegotiateFlagin interfaceSwitchPort- Parameters:
bFlag- Takes in a parameter of bFlag
-
isNonegotiate
public boolean isNonegotiate()Information provided by the PKI file:
\brief Returns true if this nonnegotiate is enabled, otherwise false. \return bool, true if this nonnegotiate is enabled, otherwise false.- Specified by:
isNonegotiatein interfaceSwitchPort- Returns:
- boolean Returns a boolean
-
setAdminOpMode
Information provided by the PKI file:
\brief Sets the admin op port mode. \param type, the port mode. Port modes: eAdminDynamicDesirable = 0, eAdminDynamicAuto = 1, eAdminOperationTrunk = 2, eAdminOperationAccess = 3- Specified by:
setAdminOpModein interfaceSwitchPort- Parameters:
type- Takes in a parameter of type
-
getAdminOpMode
public int getAdminOpMode()Information provided by the PKI file:
\brief Returns the admin op port mode. \return int, the port mode. Port modes: eAdminDynamicDesirable = 0, eAdminDynamicAuto = 1, eAdminOperationTrunk = 2, eAdminOperationAccess = 3- Specified by:
getAdminOpModein interfaceSwitchPort- Returns:
- int Returns a int
-
isAdminModeSet
public boolean isAdminModeSet()Information provided by the PKI file:
\brief Returns true if admin op port mode is set, otherwise false. \return bool, true if admin op port mode is set, otherwise false.- Specified by:
isAdminModeSetin interfaceSwitchPort- Returns:
- boolean Returns a boolean
-
getPortSecurity
Information provided by the PKI file:
\brief Returns the port security. \return PortSecurity, the PortSecurity object.- Specified by:
getPortSecurityin interfaceSwitchPort- Returns:
- PortSecurity Returns a PortSecurity
-